<?php

include("header.php");
$_POST['ctime']=time();
$pinn = sele($config,'haoyou');
?>
    
    <div id="templatemo_right_column">
    
        <div id="templatemo_main">
        
        	<h1>留言板</h1>

        <div id="comment_section">
                <ol class="comments first_level">
                       

                        <?php
                            foreach ($pinn as $k => $v) {
                                echo"<li>
                            <div class='comment_box commentbox1'>
                                    
                                <div class='gravatar'>
                                    <img src='images/avator.png' alt='author' />
                                </div>
                                
                                <div class='comment_text'>
                                    <div class='comment_author'>".$_SESSION['name']."
                                    <span class='date'>
                                        ".date('Y-m-d H:i:s',$v['ctime'])."</span></div>
                                    <p>".$v['pinlun']."</p>
                                  <div class='reply'></div>
                                </div>
                                <div class='cleaner'></div>
                            </div> 
                        </li>";
                            }

                        ?>
                        <center>
         <a href="contact.php?p=1">首页</a>
        <a href="contact.php?p=<?php echo $_SESSION['shang'] ?>">上一页</a>
        <a href="contact.php?p=<?php echo $_SESSION['xia'] ?>">下一页</a>
        <a href="contact.php?p=<?php echo $_SESSION['fen'] ?>">尾页</a>
        总共<?php echo $_SESSION['fen']; ?>页  &nbsp;&nbsp;当前第<?php echo $_SESSION['p'];?>页</center>
                </ol>
                    
                </div>

            <div id="contact_form" style="margin-top:-20px;">
            
                <h2>开始留言</h2>
 
    <form action="contado.php" method="post">   

    <input type="hidden" name="ctime"/>
    <!--<input type="text" name="pinlun" class="submit_btn" style="margin-left:0; width:469px; height:150px;" />-->
    <textarea name="pinlun" class="common-textarea" id="content" cols="30" style="width: 98%;" rows="10"></textarea>
    <input type="submit" value="提交留言" class="submit_btn" style="margin-left:416px; margin-top:5px;" />

    </form>

            </div> 


        
        </div> <!-- end of main -->
        <div class="cleaner"></div>
    </div> <!-- end of right column -->
    <?php
include("footer.php");
    ?>
    
 